namespace :bilibiliranking do
  desc "bilibili ranking example op"
  task :op => :environment do
    doc = BiliRankingMaker.create({:path => "#{BILI_PRO_PATH}#{ENV['pa']}\\"}) do |vvm|
      vvm.op.pics("op", [1], {:length => 5, 2 => {:length => 9}, 4 => {:length => 3}}
                 ).pics("rule", 0..4, {:length => VegasVideoTime.new(0, 0, 2, 25), :fade_in_length => nil, :fade_out_length => nil, 0 => { :fade_in_length => BiliRankingMaker::TIME_20},4 => {:length => 5, :fade_out_length => BiliRankingMaker::TIME_20}}
                 ).title(1).music("bilibili.mp3", vvm.vvmtime - 1, :start_time => VegasVideoTime.nl(15))
    end
    doc.write File.open("#{BILI_PRO_PATH}#{ENV['pa']}\\" + "xml.xml", 'w')
  end
end